<?php
include_once('themes/head.php');	
include_once('controller/produkController.php');
include_once('controller/keranjangController.php');
?>
<div id="">
<pre><h2>Detail Produk</h2></pre>
<?php
	if(isset($_GET['detail']))
	{
		if($det_produk==0)
		{
			echo "<pre>Produk Tidak Ada</pre>";
		}
		else
		{
			foreach($det_produk as $det)
			{
?>
				<table class="table table-bordered">
					<tr>
						<th>
							Nama
						</th>
						<td>
							<?php echo $det['nama']; ?>
						</td>
						<td>
							jenis Sayur
						</td>
						<td>
							<?php echo $det['nama_jns_sayur']; ?>
						</td>
					</tr>
					<tr>
						<th>
							Deskripsi
						</th>
						<td colspan="3">
							<?php echo $det['deskripsi']; ?>
						</td>
						
					</tr>
					<tr>
						<th>
							Stok
						</th>
						<td>
							<?php echo $det['stok']; ?>
						</td>
						<td colspan="2">
							<?php echo $det['nama_satuan']; ?>
						</td>
					</tr>
					<tr class="success">
						<th>
							Harga
						</th>
						<td>
							Rp.&nbsp;<?php echo $det['harga']; ?>
						</td>
						<td colspan="2">
							Per &nbsp;<?php echo $det['nama_satuan']; ?>
						</td>
					</tr>
					<tr>
						<td colspan="3">
							<a href="produk.php?id=<?php echo $det['id']; ?>&jumlah=1" class="btn btn-large btn-primary disabled">Beli</a>
						</td>
					</tr>
				</table>
<?php
			}
		}
	}
	else
	{
		echo "<pre>Link Not Defined</pre>";
		header ('refresh: 3; produk.php');
	}
?>
</div>

<?php
	include_once('themes/footer.php');
?>